import request from "@/utils/http";

// 新增问题
export function addQuestion(data) {
	return request({
		url: "/api/question/add",
		method: "POST",
		data
	});
}

// 获取问题列表
export function getQuestionList(data) {
	return request({
		url: "/api/question/list/page",
		method: "POST",
		data
	});
}

// 删除问题
export function deleteQuestion(data) {
	return request({
		url: "/api/question/delete",
		method: "POST",
		data
	});
}

// 获取问题详情
export function getQuestionDetail(id) {
	return request({
		url: "/api/question/get",
		method: "GET",
		params: {
			id: id
		}
	});
}

// 更新问题
export function updateQuestion(data) {
	return request({
		url: "/api/question/update",
		method: "POST",
		data
	});
}
